package com.example.demo.controller;

import com.example.demo.entity.Role;
import com.example.demo.repository.impl.TestImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by Administrator on 2017/11/10.
 */
@RestController
public class TestSessionFactory {

    @Resource
    TestImpl testImp;

    @RequestMapping("/sessionFactory")
    public String sessionFactory() {
        Role role = testImp.getRoleByPK(1L);
        return "role :" + role.getRoleName();
    }
}
